<template>
  <div id="app">
    <v-header v-bind:seller="seller"></v-header>
    <ul class="tab">
      <li class="tab-item">
        <router-link to="/goods">商品</router-link>
      </li>
      <li class="tab-item">
        <router-link to="/ratings">评论</router-link>
      </li>
      <li class="tab-item">
        <router-link to="/seller">商家</router-link>
      </li>
    </ul>
    <div class="content">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
  import header from './components/header/header'
  export default {
    name: 'app',
    data(){
      return {
        seller : {}
      }
    },
    created(){
      this.$http.get('https://dsn.apizza.net/mock/6a800a457cff8471abd6177620ca593c/seller').then((result) => {
        this.seller = result.body
        // console.log(this.seller)
      })
    },
    components: {
      'v-header': header
    }
  }
</script>

<style scoped>
  .tab{
    display: flex;
    width: 100%;
    height: 40px;
    line-height: 40px;
    border-bottom: 1px solid rgba(0,0,0,0.1)
  }
  .tab .tab-item {
    flex: 1;
    text-align: center;
  }
  .tab .tab-item a {
    display: block;
    font-size: 14px;
    color: rgb(77, 85, 93);
  }
  .tab .tab-item .active {
    color: rgb(240, 20, 20);
  }
</style>
